package com.wanxi.test;

import java.util.Arrays;

public class StringToArray {
    public static void main(String[] args) {
        String aa = "91 27 46 37 56";
        String [] strings=aa.split(" ");
        for (int i = 0; i < strings.length; i++) {
            System.out.println(strings[i]);
        }
        int size = strings.length;
        int[] arr = new int[size];
        for (int i = 0; i < strings.length; i++) {
            arr[i]=Integer.parseInt(strings[i]);
        }
        System.out.println(Arrays.toString(arr));
//        System.out.println(Arrays.toString(strings));
    }
}
